lib/commit: Set xattr on correct fd for bare-user → bare-user imports
authorColin Walters <walters@verbum.org>
Wed, 16 Jan 2019 13:36:55 +0000 (08:36 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 16 Jan 2019 14:37:15 +0000 (14:37 +0000)
Another fix to https://github.com/ostreedev/ostree/pull/1771

Closes: #1803
Approved by: jlebon

src/libostree/ostree-repo-commit.c

index c95e0b611d669f324afbf384cc45c977f2c6aab2..dfdd485324112217cc2a7908756fb8d97bc59909 100644 (file)
@@ -4287,7 +4287,7 @@ import_one_object_direct (OstreeRepo    *dest_repo,
               if (bytes == NULL)
                 return FALSE;
 
-              if (TEMP_FAILURE_RETRY (fsetxattr (src_fd, "user.ostreemeta",
+              if (TEMP_FAILURE_RETRY (fsetxattr (tmp_dest.fd, "user.ostreemeta",
                                                  (char*)g_bytes_get_data (bytes, NULL),
                                                  g_bytes_get_size (bytes), 0)) != 0)
                 return glnx_throw_errno_prefix (error, "fsetxattr");